#ifndef _ZCUBE_H_
#define _ZCUBE_H_

class ZCube : public ZCommonModel
{
public:
	struct CUBEVERTEX
	{
		D3DXVECTOR3 p;
		D3DXVECTOR3 n;
		D3DXVECTOR2 t;

		enum { FVF = D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_TEX1 };
		enum { VertexNum = 24 };
	};

	struct CUBEINDEX
	{
		WORD _0, _1, _2;
	};

	ZCube();
	virtual ~ZCube();

	HRESULT Init() { return S_OK; }
	HRESULT Init( LPDIRECT3DVERTEXBUFFER9 &a_pVB, LPDIRECT3DINDEXBUFFER9 &a_pIB, INT a_iStartVB, INT a_iStartIB, FLOAT a_fCubeSize=0.5f );
	HRESULT InitTexture( DWORD a_Color, DWORD a_OutLineColor=0xff0000ff );
	
	VOID Draw();
	VOID CleanUp();



private:
	HRESULT _InitVB( LPDIRECT3DVERTEXBUFFER9 &a_pVB );
	HRESULT _InitIB( LPDIRECT3DINDEXBUFFER9 &a_pIB );

	//LPDIRECT3DVERTEXBUFFER9 m_pVB;
	//LPDIRECT3DINDEXBUFFER9  m_pIB;
	//LPDIRECT3DTEXTURE9		m_pTexture;
	D3DMATERIAL9			m_Mtrl;

	INT m_iStartVB;
	INT m_iStartIB;
	FLOAT m_fCubeSize;

	

};

#endif